package com.atguigu.gmall.item;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;


/**
 * 所有和商品有关的数据 由service-product来做的，我们不操作，远程调用
 * 1、feign-client被抽取以后一定用  @EnableFeignClients(basePackages = "com.atguigu.gmall.product")
 * 2、还要加
 * spring:
 *   main:
 *     allow-bean-definition-overriding: true  #允许bean定义信息的重写
 *
 * 以后任意项目起报名
 *      com.atguigu.gmall.模块.mvc三层包
 *
 * 1、SpringBoot 对Redis做了哪些配置
 *      1.1)、RedisAutoConfiguration
 *          RedisTemplate<String, String>  object = 给redis存的是json
 *          StringRedisTemplate:  extends RedisTemplate<String, String>   用这个
 *
 *
 */

//抽取feign以后，每个微服务要引用，要自己声明feign所在的包
@EnableFeignClients(basePackages = {
        "com.atguigu.gmall.feign.product",
        "com.atguigu.gmall.feign.search"
})  //开启feign远程调用
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@EnableCircuitBreaker
public class ItemApplication {

    public static void main(String[] args) {
        SpringApplication.run(ItemApplication.class,args);
    }


}
